package com.dfec.dao;


import java.sql.SQLException;
import java.util.List;

import com.dfec.model.News;
import com.dfec.model.User;

public interface INewsDao {
	  //获取新闻列表
		List<News> getNewsListByConditions(News news, int page, int size) throws SQLException;  
		//获取新闻轮播
		List<News> getNewsListCarouselTop5()throws SQLException;
		//插入新闻列表
		boolean saveBatchNews(List<News> newsList)throws SQLException;
		
	    //获取新闻详情
		News getNewsContent(News newsId) throws SQLException;
		
		boolean deleteBatchNewsbyId(String[] newsIds) throws SQLException;
		
		//更新点赞数据addOrdel=+1点赞-1取消点赞
		boolean updatePraiseBy(String newsIds,int addOrdel) throws SQLException;
		//更新浏览量
		boolean updateSeeTimesBy(String newsIds) throws SQLException;
		//更新评论次数
		boolean updateCommentTimesBy(String newsIds,int addOrdel) throws SQLException;
		
		int getSeeTimesOrCommentOrSeeByNewsIds(String clum,String newsIds) throws SQLException;
}
